home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 53 / IOPROG_53.ISO / soft / c++ / xceedbkp.exe / Recovery Wizard / Sources / frmFour.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-09-02  |  7.9 KB  |  257 lines

  1. VERSION 5.00
  2. Begin VB.Form frmFour 
  3.    BackColor       =   &H8000000B&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Xceed Recovery Wizard"
  6.    ClientHeight    =   4290
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   7425
  10.    Icon            =   "frmFour.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   4290
  14.    ScaleWidth      =   7425
  15.    Begin VB.CommandButton cmdTemp 
  16.       Caption         =   "Restore"
  17.       Enabled         =   0   'False
  18.       Height          =   375
  19.       Left            =   4560
  20.       TabIndex        =   10
  21.       Top             =   3720
  22.       Width           =   1215
  23.    End
  24.    Begin VB.CheckBox chkPreserveTree 
  25.       Caption         =   "Recreate subfolder tree"
  26.       Enabled         =   0   'False
  27.       Height          =   255
  28.       Left            =   2160
  29.       TabIndex        =   4
  30.       Top             =   2040
  31.       Width           =   2295
  32.    End
  33.    Begin VB.CommandButton cmdBrowseAltLocation 
  34.       Caption         =   "..."
  35.       Enabled         =   0   'False
  36.       Height          =   255
  37.       Left            =   6840
  38.       TabIndex        =   3
  39.       Top             =   1680
  40.       Width           =   375
  41.    End
  42.    Begin VB.OptionButton optAltTree 
  43.       BackColor       =   &H8000000B&
  44.       Caption         =   "Alternate location"
  45.       Height          =   195
  46.       Left            =   1920
  47.       TabIndex        =   1
  48.       Top             =   1440
  49.       Width           =   3015
  50.    End
  51.    Begin VB.OptionButton optOriginalLocation 
  52.       Caption         =   "Original Location"
  53.       Height          =   195
  54.       Left            =   1920
  55.       TabIndex        =   0
  56.       Top             =   960
  57.       Width           =   2655
  58.    End
  59.    Begin VB.TextBox txtAltTree 
  60.       BackColor       =   &H8000000B&
  61.       Enabled         =   0   'False
  62.       Height          =   285
  63.       Left            =   2160
  64.       TabIndex        =   2
  65.       Top             =   1680
  66.       Width           =   4575
  67.    End
  68.    Begin VB.CommandButton cmdCancel 
  69.       Caption         =   "Cancel"
  70.       Height          =   375
  71.       Left            =   6000
  72.       TabIndex        =   8
  73.       Top             =   3720
  74.       Width           =   1215
  75.    End
  76.    Begin VB.CommandButton cmdNext 
  77.       Caption         =   "Next  >"
  78.       Height          =   375
  79.       Left            =   3120
  80.       TabIndex        =   5
  81.       Top             =   3720
  82.       Width           =   1215
  83.    End
  84.    Begin VB.CommandButton cmdPrev 
  85.       Caption         =   "<  Previous"
  86.       Height          =   375
  87.       Left            =   1920
  88.       TabIndex        =   6
  89.       Top             =   3720
  90.       Width           =   1215
  91.    End
  92.    Begin VB.Line Line1 
  93.       BorderColor     =   &H80000011&
  94.       Index           =   0
  95.       X1              =   1680
  96.       X2              =   1680
  97.       Y1              =   120
  98.       Y2              =   4080
  99.    End
  100.    Begin VB.Line Line1 
  101.       BorderColor     =   &H80000009&
  102.       Index           =   1
  103.       X1              =   1695
  104.       X2              =   1695
  105.       Y1              =   120
  106.       Y2              =   4080
  107.    End
  108.    Begin VB.Label Label3 
  109.       Caption         =   "Step 3 of 4"
  110.       BeginProperty Font 
  111.          Name            =   "MS Sans Serif"
  112.          Size            =   8.25
  113.          Charset         =   0
  114.          Weight          =   700
  115.          Underline       =   0   'False
  116.          Italic          =   0   'False
  117.          Strikethrough   =   0   'False
  118.       EndProperty
  119.       Height          =   255
  120.       Left            =   120
  121.       TabIndex        =   11
  122.       Top             =   3840
  123.       Width           =   1095
  124.    End
  125.    Begin VB.Image Image1 
  126.       Height          =   1260
  127.       Left            =   120
  128.       Picture         =   "frmFour.frx":0BC2
  129.       Top             =   120
  130.       Width           =   1410
  131.    End
  132.    Begin VB.Label Label2 
  133.       Caption         =   "Where do you want to restore your files to?"
  134.       Height          =   255
  135.       Left            =   1920
  136.       TabIndex        =   9
  137.       Top             =   360
  138.       Width           =   3375
  139.    End
  140.    Begin VB.Label Label1 
  141.       Caption         =   "Restore folder selection"
  142.       BeginProperty Font 
  143.          Name            =   "MS Sans Serif"
  144.          Size            =   8.25
  145.          Charset         =   0
  146.          Weight          =   700
  147.          Underline       =   -1  'True
  148.          Italic          =   0   'False
  149.          Strikethrough   =   0   'False
  150.       EndProperty
  151.       Height          =   255
  152.       Left            =   1920
  153.       TabIndex        =   7
  154.       Top             =   120
  155.       Width           =   2535
  156.    End
  157. Attribute VB_Name = "frmFour"
  158. Attribute VB_GlobalNameSpace = False
  159. Attribute VB_Creatable = False
  160. Attribute VB_PredeclaredId = True
  161. Attribute VB_Exposed = False
  162. Option Explicit
  163. Dim xClass As clsXceed
  164. Dim ExitInc As Integer
  165. Public Function ShowForm(xObjects As clsXceed) As Integer
  166.     'This is where you will fill in the fields on your forms with the values
  167.     'in xObjects.
  168.     If xObjects.xRestore.RedirectToFolder = "" Then
  169.         optOriginalLocation.Value = True
  170.     Else
  171.         optAltTree.Value = True
  172.         txtAltTree.Text = xObjects.xRestore.RedirectToFolder
  173.     End If
  174.     If xObjects.xRestore.PreservePaths Then
  175.         chkPreserveTree.Value = vbChecked
  176.     Else
  177.         chkPreserveTree.Value = vbUnchecked
  178.     End If
  179.     Call RefreshLocation
  180.     Set xClass = xObjects
  181.     Me.Left = xClass.PositionLeft
  182.     Me.Top = xClass.PositionTop
  183.     Me.Show vbModal
  184.     xClass.PositionLeft = Me.Left
  185.     xClass.PositionTop = Me.Top
  186.     'At this point, the form is now hidden and ExitInc contains the increment.
  187.     'If ExitInc is not 0 then set xobjects to the field values.
  188.     If ExitInc <> 0 Then
  189.         If optOriginalLocation.Value Then
  190.             xObjects.xRestore.RedirectToFolder = ""
  191.         Else
  192.             optAltTree.Value = True
  193.             xObjects.xRestore.RedirectToFolder = txtAltTree.Text
  194.         End If
  195.           
  196.         If chkPreserveTree.Value = vbChecked Then
  197.             xObjects.xRestore.PreservePaths = True
  198.         Else
  199.             xObjects.xRestore.PreservePaths = False
  200.         End If
  201.     End If
  202.     Set xClass = Nothing
  203.     ShowForm = ExitInc
  204. End Function
  205. Private Sub cmdBrowseAltLocation_Click()
  206.     Dim sFolder As String
  207.     Dim bFolderSelected As Boolean
  208.     bFolderSelected = BrowseForFolder(sFolder, "", Me.hwnd)
  209.         
  210.     If bFolderSelected Then
  211.         txtAltTree.Text = sFolder
  212.     End If
  213.         
  214. End Sub
  215. Private Sub cmdCancel_Click()
  216.     Dim Answer As VbMsgBoxResult
  217.     Answer = MsgBox("Your backups have not yet been restored. Cancel anyway?", vbYesNo + vbQuestion)
  218.     If Answer = vbYes Then
  219.         ExitInc = 0
  220.         Me.Hide
  221.     End If
  222.      
  223. End Sub
  224. Private Sub cmdNext_Click()
  225.     ExitInc = 1
  226.     Me.Hide
  227. End Sub
  228. Private Sub cmdPrev_Click()
  229.    ExitInc = -1
  230.    Me.Hide
  231. End Sub
  232. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  233.     If UnloadMode <> vbFormCode Then
  234.         Cancel = True
  235.         Call cmdCancel_Click
  236.     End If
  237. End Sub
  238. Private Sub optAltTree_Click()
  239.     Call RefreshLocation
  240. End Sub
  241. Private Sub optOriginalLocation_Click()
  242.     Call RefreshLocation
  243. End Sub
  244. Private Sub RefreshLocation()
  245.     If optAltTree.Value Then
  246.         txtAltTree.Enabled = True
  247.         txtAltTree.BackColor = &H80000005
  248.         cmdBrowseAltLocation.Enabled = True
  249.         chkPreserveTree.Enabled = True
  250.     Else
  251.         txtAltTree.Enabled = False
  252.         txtAltTree.BackColor = &H8000000B
  253.         cmdBrowseAltLocation.Enabled = False
  254.         chkPreserveTree.Enabled = False
  255.     End If
  256. End Sub
  257.